<%@page import="vlms.bean.SimpleCustomer" %>
<%@page import="vlms.bean.PremiumCustomer" %>
<%@page import="vlms.bean.Person" %>
<%@page import="vlms.bean.Account" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<%@ include file="/title.html" %>
</head>
<body>
<table width="100%">
<%@ include file="/header.jsp" %>

<tr valign="top"><td align="center" height="300px">
<table width="50%" align="center">

<tr valign="top" height="50px">
<td align="center">
<%@ include file="/headerLinks.jsp" %>
</td>
</tr>
<tr><td align="center" height="40px" colspan="2" valign="top"><h3>Profile</h3></td></tr>
<% if(request.getAttribute("message") != null) { %>
<tr><td align="center" style="color:red" colspan="2" height="40px" valign="top"><%= request.getAttribute("message") %></td></tr>
<% } %>

<% SimpleCustomer oSC = (SimpleCustomer)session.getAttribute("SimpleCustomer");
PremiumCustomer oPC = (PremiumCustomer)session.getAttribute("PremiumCustomer");
Person oPerson = (Person)session.getAttribute("Person");
Account oAccount = (Account)session.getAttribute("Account");
%>

<form name="profile" action="Profile" method="post">

<tr>
<td align="left">First Name:</td>

<td><input type="text" name="firstname" value="<%=oPerson.getFirstname() %>"></td>
</tr>
<tr>
<td align="left">Last Name:</td>
<td><input type="text" name="lastname" value="<%=oPerson.getLastname() %>"></td>
</tr>
<tr>
<td align="left">Username: </td>
<td><input type="text" name="username" value="<%=oAccount.getUsername() %>"></td>
</tr>
<tr>
<tr>
<td align="left">Email Id: </td>
<td><input type="text" name="email" value="<%=oPerson.getEmailid() %>"></td>
</tr>
<tr>
<td align="left">Address: </td>
<td><textarea name="address"><%=oPerson.getAddress()%></textarea></td>
</tr>
<tr>
<td align="left">City: </td>
<td><input type="text" name="city" id="city" value="<%=oPerson.getCity() %>"></td>
</tr>
<tr>
<td align="left">State: </td>
<td><select name="state" size="1" value="<%=oPerson.getState() %>">
    <option value="AL">Alabama</option>
    <option value="AK">Alaska</option>
    <option value="AZ">Arizona</option>
    <option value="AR">Arkansas</option>
    <option value="CA">California</option>
    <option value="CO">Colorado</option>
    <option value="CT">Connecticut</option>
    <option value="DE">Delaware</option>
    <option value="DC">Dist of Columbia</option>
    <option value="FL">Florida</option>
    <option value="GA">Georgia</option>
    <option value="HI">Hawaii</option>
    <option value="ID">Idaho</option>
    <option value="IL">Illinois</option>
    <option value="IN">Indiana</option>
    <option value="IA">Iowa</option>
    <option value="KS">Kansas</option>
    <option value="KY">Kentucky</option>
    <option value="LA">Louisiana</option>
    <option value="ME">Maine</option>
    <option value="MD">Maryland</option>
    <option value="MA">Massachusetts</option>
    <option value="MI">Michigan</option>
    <option value="MN">Minnesota</option>
    <option value="MS">Mississippi</option>
    <option value="MO">Missouri</option>
    <option value="MT">Montana</option>
    <option value="NE">Nebraska</option>
    <option value="NV">Nevada</option>
    <option value="NH">New Hampshire</option>
    <option value="NJ">New Jersey</option>
    <option value="NM">New Mexico</option>
    <option value="NY">New York</option>
    <option value="NC">North Carolina</option>
    <option value="ND">North Dakota</option>
    <option value="OH">Ohio</option>
    <option value="OK">Oklahoma</option>
    <option value="OR">Oregon</option>
    <option value="PA">Pennsylvania</option>
    <option value="RI">Rhode Island</option>
    <option value="SC">South Carolina</option>
    <option value="SD">South Dakota</option>
    <option value="TN">Tennessee</option>
    <option value="TX">Texas</option>
    <option value="UT">Utah</option>
    <option value="VT">Vermont</option>
    <option value="VA">Virginia</option>
    <option value="WA">Washington</option>
    <option value="WV">West Virginia</option>
    <option value="WI">Wisconsin</option>
    <option value="WY">Wyoming</option>
</select></td>
</tr>

<tr>
<td align="left">Zipcode: </td>
<td><input type="text" name="zipcode" id="zipcode" value="<%=oPerson.getZipcode()%>"></td>
</tr>

<tr>
<td align="left">Credit Card Number: </td>
<!--  <td><input type="text" name="creditcardno" id="credit_no" value="<%=request.getParameter("creditcardno")!=null?request.getParameter("creditcardno"):"" %>"></td> -->
<td><input type="text" name="creditcardno" id="credit_no" value="<%=oPerson.getCreditcardnum() %>"></td>
</tr>

<tr>
<td align="left">Credit Card Type: </td>
<td><SELECT id="creditcard_type" name="creditcard_type">
      <option value="Visa">Visa<option>
      <option value="Mastercard">Mastercard<option>
      <option value="American Express">American Express<option>
      </SELECT></td>
</tr>

<tr>
<td align="left">CVV Code: </td>
<td><input type="text" name="Cvvnumber" id="Cvvnumber" value="<%=oPerson.getCreditcardcvv()%>"></td>
</tr>
<tr>
<td height="5px">
</td>
</tr>
<tr>
<tr>
<td colspan="2" align="center">
<input type="submit" name="update" value="Update Profile" >
<input type="reset" name="reset" value="Reset">
</td>
</tr>
</form>
<tr>
<td colspan="2" align="center">
<form name="cancel" action="signIn.jsp" method="post">
<input type="submit" name="cancel" value="Go Back and Sign In">
</form>
</td>
</tr>
</table>
</td>
</tr>
<%@ include file="/bottom.html" %>
</table>
</body>
</html>